import { ref } from 'vue'
import { defineStore } from "pinia"
import { titleItem } from '@/types/titleItem'   //类型
export const useTitlesStore = defineStore('titleList', () => {
    const titles = ref<titleItem[]>([])                //title的原始数据，是字符串数组与距离顶端距离的对象数组
    function setTitle(value:titleItem[]){
        titles.value = value
        console.log('setTitle',value);
    }
    return {titles,setTitle}
})